//
//  ConfirmOrderNoAddressCell.m
//  sensen_ios
//
//  Created by pro on 16/2/27.
//  Copyright © 2016年 pro. All rights reserved.
//

#import "ConfirmOrderNoAddressCell.h"

#define cell_width self.contentView.width
#define cell_height self.contentView.height



@implementation ConfirmOrderNoAddressCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        
        self.contentView.width = SCREEN_WIDTH;
        self.contentView.height = 44;
        [self _initViews];
    }
    
    return self;
}

#pragma mark -- 创建视图 --
- (void)_initViews {
    
    CGFloat x, y, width, height;
    
    // 图标
    x = 15;
    width = 20;
    height = 25;
    UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(x, y, width, height)];
    imgView.image = [UIImage imageNamed:@"订单详情_地址"];
    [self.contentView addSubview:imgView];
    imgView.center = CGPointMake(imgView.center.x, cell_height / 2);
    
    // 标题
    x = imgView.right + 10;
    width = 100;
    height = 20;
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(x, y, width, height)];
    titleLabel.font = FONT(15);
    titleLabel.text = @"添加收货地址";
    titleLabel.textColor = [UIColor darkGrayColor];
    titleLabel.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:titleLabel];
    titleLabel.center = CGPointMake(titleLabel.center.x, cell_height / 2);
}

@end
